<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:py="http://genshi.edgewall.org/"
      xmlns:xi="http://www.w3.org/2001/XInclude">

<py:def function="page_title">Users</py:def>
<py:def function="head_info"></py:def>
<py:def function="page_parents"></py:def>

<py:match path="content">
    <span py:replace="tg.display(pager)">[pager]</span>
    <span py:replace="tg.display(grid, users)"></span>
    <div class="buttons">
        <button id="register_button">Register</button>
        <button py:if="'send-mail' in tg.identity.permissions" id="email_button">Email All</button>
    </div>
    <script type="text/javascript">
        // EVENTS //
        safe_connect('register_button', 'onclick',
            function()
            {
                redirect(${tg.jsencode(tg.hvz.register_link())});
            });
        safe_connect('email_button', 'onclick',
            function()
            {
                redirect(${tg.jsencode(tg.url('/mail', recipients=emails))});
            });
    </script>
</py:match>

<xi:include href="../master.html" />

</html>
